-- GENERATED SPELL FOR [Leprous Defender] --


function spell0_6223(pUnit, Event) --@Multi-Shot,n/a--
pUnit:FullCastSpellOnTarget(14443,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6223', 553, 1)
end

function spell1_6223(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(6660,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6223', 539, 1)
end

function Sorts_6223(pUnit, Event)
local choix_sorts_6223 = math.random(0, 1)
if choix_sorts_6223 == 0 then
pUnit:RegisterEvent('spell0_6223', 1, 1)
end
if choix_sorts_6223 == 1 then
pUnit:RegisterEvent('spell1_6223', 1, 1)
end
end

function mob6223_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_6223', math.random(1500, 3000), 1)
end

function mob6223_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6223_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6223_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(6223, 1, 'mob6223_Action')
RegisterUnitEvent(6223, 2, 'mob6223_Leave')
RegisterUnitEvent(6223, 3, 'mob6223_Kill')
RegisterUnitEvent(6223, 4, 'mob6223_Die')
